package com.tangshuai.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author TANGSHUAI
 * @version 1.0
 * @date 2024-03-14 16:21
 */
@Configuration
public class DemoConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 添加新的静态资源位置
        registry.addResourceHandler("/tv/**")
                .addResourceLocations("file:d:/tv/");
    }
}
